.class public Lcom/waiqin365/lightapp/syorder/a;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/widget/PopupWindow;

.field private b:Landroid/view/View;

.field private c:Landroid/widget/EditText;

.field private d:Landroid/widget/TextView;

.field private e:Landroid/widget/ImageView;

.field private f:Landroid/widget/Button;

.field private g:Landroid/content/Context;

.field private h:Lcom/waiqin365/lightapp/syorder/d/a;

.field private i:Lcom/waiqin365/lightapp/syorder/h;

.field private j:Lcom/waiqin365/lightapp/syorder/g;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    sget-object v0, Lcom/waiqin365/lightapp/syorder/h;->a:Lcom/waiqin365/lightapp/syorder/h;

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->i:Lcom/waiqin365/lightapp/syorder/h;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/syorder/a;->b()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/waiqin365/lightapp/syorder/h;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/syorder/a;->i:Lcom/waiqin365/lightapp/syorder/h;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/syorder/a;->b()V

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/syorder/a;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    return-object v0
.end method

.method private a()V
    .locals 6

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    const v1, 0x7f040005

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v0

    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1}, Landroid/os/Handler;-><init>()V

    new-instance v2, Lcom/waiqin365/lightapp/syorder/c;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/syorder/c;-><init>(Lcom/waiqin365/lightapp/syorder/a;)V

    invoke-virtual {v0}, Landroid/view/animation/Animation;->getDuration()J

    move-result-wide v4

    invoke-virtual {v1, v2, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    invoke-virtual {v1, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    goto :goto_0
.end method

.method static synthetic b(Lcom/waiqin365/lightapp/syorder/a;)Landroid/widget/PopupWindow;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    return-object v0
.end method

.method private b()V
    .locals 5

    const/4 v4, 0x1

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f030256

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c0084

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->d:Landroid/widget/TextView;

    const v0, 0x7f0c0920

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->i:Lcom/waiqin365/lightapp/syorder/h;

    sget-object v2, Lcom/waiqin365/lightapp/syorder/h;->b:Lcom/waiqin365/lightapp/syorder/h;

    if-ne v0, v2, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->d:Landroid/widget/TextView;

    const-string/jumbo v2, "\u5220\u9664\u539f\u56e0"

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    const-string/jumbo v2, "\u8bf7\u8f93\u5165\u5220\u9664\u539f\u56e0"

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    :goto_0
    const v0, 0x7f0c091f

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c0921

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->f:Landroid/widget/Button;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->f:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c091e

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->e:Landroid/widget/ImageView;

    new-instance v2, Lcom/waiqin365/lightapp/syorder/d;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/syorder/d;-><init>(Lcom/waiqin365/lightapp/syorder/a;)V

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v0, Lcom/waiqin365/lightapp/syorder/e;

    invoke-direct {v0, p0}, Lcom/waiqin365/lightapp/syorder/e;-><init>(Lcom/waiqin365/lightapp/syorder/a;)V

    invoke-virtual {v1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    new-instance v2, Lcom/waiqin365/lightapp/syorder/f;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/syorder/f;-><init>(Lcom/waiqin365/lightapp/syorder/a;)V

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    new-instance v0, Landroid/widget/PopupWindow;

    const/4 v2, -0x1

    const/4 v3, -0x2

    invoke-direct {v0, v1, v2, v3}, Landroid/widget/PopupWindow;-><init>(Landroid/view/View;II)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    const/16 v1, 0x10

    invoke-virtual {v0, v1}, Landroid/widget/PopupWindow;->setSoftInputMode(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    invoke-virtual {v0, v4}, Landroid/widget/PopupWindow;->setInputMethodMode(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    invoke-virtual {v0, v4}, Landroid/widget/PopupWindow;->setFocusable(Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    invoke-virtual {v0, v4}, Landroid/widget/PopupWindow;->setOutsideTouchable(Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

    invoke-direct {v1}, Landroid/graphics/drawable/BitmapDrawable;-><init>()V

    invoke-virtual {v0, v1}, Landroid/widget/PopupWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->d:Landroid/widget/TextView;

    const-string/jumbo v2, "\u53d6\u6d88\u539f\u56e0"

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    const-string/jumbo v2, "\u8bf7\u8f93\u5165\u53d6\u6d88\u539f\u56e0"

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method

.method static synthetic c(Lcom/waiqin365/lightapp/syorder/a;)Landroid/widget/EditText;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic d(Lcom/waiqin365/lightapp/syorder/a;)V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/syorder/a;->a()V

    return-void
.end method


# virtual methods
.method public a(Lcom/waiqin365/lightapp/syorder/d/a;)V
    .locals 8

    const/4 v3, 0x0

    iput-object p1, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->a:Landroid/widget/PopupWindow;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v0

    const/16 v2, 0x50

    invoke-virtual {v1, v0, v2, v3, v3}, Landroid/widget/PopupWindow;->showAtLocation(Landroid/view/View;III)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    const v1, 0x7f040004

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v0

    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1}, Landroid/os/Handler;-><init>()V

    new-instance v2, Lcom/waiqin365/lightapp/syorder/b;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/syorder/b;-><init>(Lcom/waiqin365/lightapp/syorder/a;)V

    invoke-virtual {v0}, Landroid/view/animation/Animation;->getDuration()J

    move-result-wide v4

    const-wide/16 v6, 0x64

    add-long/2addr v4, v6

    invoke-virtual {v1, v2, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->clearAnimation()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->b:Landroid/view/View;

    invoke-virtual {v1, v0}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    :cond_0
    return-void
.end method

.method public a(Lcom/waiqin365/lightapp/syorder/g;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/syorder/a;->j:Lcom/waiqin365/lightapp/syorder/g;

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 5

    const/16 v3, 0x32

    const/4 v4, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-le v0, v3, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    const v2, 0x7f0805de

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v2, v4

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_0

    :cond_0
    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->g:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/login/mainview/a;->i(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    iput-object v0, v1, Lcom/waiqin365/lightapp/syorder/d/a;->r:Ljava/lang/String;

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "yyyy-MM-dd hh:mm"

    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    new-instance v1, Ljava/util/Date;

    invoke-direct {v1}, Ljava/util/Date;-><init>()V

    invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    iput-object v0, v1, Lcom/waiqin365/lightapp/syorder/d/a;->q:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->i:Lcom/waiqin365/lightapp/syorder/h;

    sget-object v1, Lcom/waiqin365/lightapp/syorder/h;->b:Lcom/waiqin365/lightapp/syorder/h;

    if-ne v0, v1, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/waiqin365/lightapp/syorder/d/a;->u:Ljava/lang/String;

    :goto_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/view/View;)V

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->j:Lcom/waiqin365/lightapp/syorder/g;

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    invoke-interface {v0, v1}, Lcom/waiqin365/lightapp/syorder/g;->a(Lcom/waiqin365/lightapp/syorder/d/a;)V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    const-string/jumbo v1, "2"

    iput-object v1, v0, Lcom/waiqin365/lightapp/syorder/d/a;->p:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/syorder/a;->h:Lcom/waiqin365/lightapp/syorder/d/a;

    iget-object v1, p0, Lcom/waiqin365/lightapp/syorder/a;->c:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/waiqin365/lightapp/syorder/d/a;->t:Ljava/lang/String;

    goto :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x7f0c0921
        :pswitch_0
    .end packed-switch
.end method
